<div class="row">
  <div class="col-md-3 col-md-offset-10">
    <button type="button" class="btn btn-info" data-toggle="modal" data-target=".bs-example-modal-sm">员工导入</button>
    <button type="button" class="btn btn-info">导出得分</button>
  </div>
</div>
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="gridSystemModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="gridSystemModalLabel">员工导入</h4>
      </div>
      <div class="modal-body">
        <div class="row">
          <div class="col-md-6 col-md-offset-3"><%= form_tag("/employees/upload", method: "post", multipart: true) do %>
            <%= file_field_tag 'excel' %>
            </div>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <%= submit_tag("提交", :class => 'btn btn-primary') %>
        <% end %>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div class="bs-example" data-example-id="bordered-table">
  <h4>员工列表</h4>
  <table class="table table-bordered">
    <thead>
      <tr>
        <th>id</th>
        <th>员工姓名</th>
        <th>所属部门</th>
        <th>职务</th>
        <th>级别</th>
        <th>岗位</th>
        <th>得分</th>
      </tr>
    </thead>
    <tbody>
      <% for i in @emps %>
        <tr>
          <th scope="row"><%=i["id"]%></th>
          <td><%=i["name"]%></td>
          <td><%=i["team_name"]%></td>
          <td><%=i["desc"]%></td>
          <td><%=i["level"]%></td>
          <td><%=i["position_name"]%></td>
          <td><%=i["score"]%></td>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>
